{% extends 'default/base.html' %}
{% load bootstrap %}
{% block head %}
{{ data.media }}
{% endblock %}
{% block content %}
    <style>
    .checkbox label{margin-right:18px;}
    </style>
         <div class="wrapper wrapper-content">
            <div class="row">
            {% include 'malfunction/left.html' %}
            <div class="col-lg-9 animated fadeInRight">
            <div class="mail-box-header">

                <h2>
                    Incident add
                </h2>
            </div>
                <form class="form-horizontal" id="form_data" method="POST" action="">{% csrf_token %}
                <div class="mail-box">
                <div class="mail-body">
                        {{ data.title | bootstrap_horizontal }}
                        {{ data.source | bootstrap_horizontal }}
                        <div class="form-group">
                        <label class="control-label col-sm-2 col-lg-2 " for="id_title">URL:</label>
                            <div class=" col-sm-8 col-lg-8 ">
                                <input class=" form-control" id="id_url" maxlength="256" name="url" type="text" />
                            </div>
                        </div>
                        {{ data.grade | bootstrap_horizontal }}
                        {{ data.mailcomment | bootstrap_horizontal }}
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                        <label class="control-label col-sm-2 col-lg-2 " for="id_title">发生时间:</label>
                            <div class=" col-sm-8 col-lg-8 ">
                                <input class=" form-control" id="id_starttime" maxlength="256" name="starttime" value="{{ date_time }}" type="text" />
                            </div>
                        </div>
                        <div class="form-group">
                        <label class="control-label col-sm-2 col-lg-2 " for="id_title">发现时间:</label>
                            <div class=" col-sm-8 col-lg-8 ">
                                <input class=" form-control" id="id_scantime" maxlength="256" name="scantime" value="{{ date_time }}" type="text" />
                            </div>
                        </div>
                        <div class="form-group">
                        <label class="control-label col-sm-2 col-lg-2 " for="id_title">结束时间:</label>
                            <div class=" col-sm-8 col-lg-8 ">
                                <input class=" form-control" id="id_stoptime" maxlength="256" name="stoptime"  type="text" />
                            </div>
                        </div>
                        {{ data.projectuser | bootstrap_horizontal }}
                        {{ data.project_status | bootstrap_horizontal }}
{#                        {{ data.project_principal | bootstrap_horizontal }}#}
                        <div class="form-group voilet_form_status">
                            <label class="control-label col-sm-2 col-lg-2 " for="id_project_principal">项目负责人</label>
                            <div class=" col-sm-10 col-lg-10 ">
                                <input class=" form-control" id="id_project_principal" maxlength="32" name="project_principal" type="text" />
                                    <p class="help-block">
                                        {{ data.project_principal.help_text }}
                                    </p>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
{#                        <div class="form-group">#}
{#                            <label class="control-label col-sm-2 col-lg-2 " for="id_mailcomment">处理过程</label>#}
{#                            <div class=" col-sm-8 col-lg-8 ">#}
{#                                <div class="mail-text h-200">#}
{#                                {{ data.comment }}#}
{#                                <div class="clearfix"></div>#}
{#                                </div>#}
{#                            </div>#}
{#                        </div>#}
                    {{ data.comment |bootstrap_horizontal }}
                    <div class="hr-line-dashed"></div>
                    {{ data.status |bootstrap_horizontal }}


                    <div class="clearfix"></div>
                        <div class="form-group">
                                <div class=" col-sm-offset-2 col-sm-8 col-lg-offset-2 col-lg-8">
                                    <div class="checkbox">
                                        <label >
                                            <input  id="id_classical" class="checkbox-line" name="classical" type="checkbox"  /> <span>设为案例</span>
                                        </label>
                                    </div>
                                    <div class="clearfix"></div>
                                </div>
                        </div>
                    <div class="clearfix"></div>

                </div>


                    <div class="form-group">
                       <div class="col-sm-4 col-sm-offset-5">
                           <button class="btn btn-white" type="submit"> 重置 </button>
                           <button class="btn btn-primary" type="submit"> 提交 </button>
                       </div>
                   </div>

                </div>
                </form>
            </div>
        </div>
     </div>
<script>
$('#id_project_status_1').unbind('click').bind('click', function () {
    $('.voilet_form_status').hide();
});
$('#id_project_status_0').unbind('click').bind('click', function () {
    $('.voilet_form_status').show();
});
</script>
{% endblock %}